package com.mpyy.service.purchase;

import com.mpyy.dao.purchase.SearchProInfoDaoInter;
import com.mpyy.pojo.ProductInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @Descoription SearchProInfoServiceImpl
 * @Author CG
 * @date 2022-03-10
 */
@Service(value = "searchProInfoServiceImpl")
public class SearchProInfoServiceImpl implements SearchProInfoServiceInter {

    @Autowired
    @Qualifier(value = "searchProInfoDaoInter")
    private SearchProInfoDaoInter proInfoDaoInter;


    /**
     * 查询商品信息
     *
     * @param proId
     * @param proName
     * @return
     */
    @Override
    public List<ProductInfo> searchProInfoDao(String proId, String proName) {
        return proInfoDaoInter.searchProInfoDao(proId, proName);
    }

    /**
     * 商品总条数
     *
     * @return
     */
    @Override
    public int productCount() {
        return proInfoDaoInter.productCount();
    }

    /**
     * 根据商品上级分类查询商品信息
     *
     * @param productInfo
     * @return
     */
    @Override
    public List<ProductInfo> searchProInfoClassify(ProductInfo productInfo) {
        return proInfoDaoInter.searchProInfoClassify(productInfo);
    }
}

